package com.runfast.paotui.dao.mapper;

import com.runfast.common.dao.IMapper;
import com.runfast.paotui.dao.model.RunfastShopper;
import com.runfast.paotui.dao.model.RunfastShopperExample;
import com.runfast.waimai.util.PageBean;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

@Mapper
public interface RunfastShopperMapper extends IMapper<RunfastShopper, Integer, RunfastShopperExample> {
    void addtoken(RunfastShopper shopper);
    List<Map<String,Object>> findbyGoods();

   RunfastShopper findByUserName(@Param("username") String username);

    void update(RunfastShopper shopper);

    List<RunfastShopper> findByAll();

   RunfastShopper findByNumeber( String munber);

    void updateNumber( RunfastShopper shopper);

RunfastShopper get(Integer id);

    List<Map<String,Object>> countShopperIncome(@Param("key") String key, @Param("startTime") Date startTime, @Param("endTime") Date endTime, @Param("page") Integer page, @Param("pageSize") Integer pageSize, @Param("tAccounts") Integer tAccounts);

    Integer getShopperCount();

    PageBean<RunfastShopper> getPageBean(@Param("pageSize") int pageSize, @Param("page") int page, @Param("t") RunfastShopper t, @Param("agentIds") List<Integer> agentIds);

    List<RunfastShopper> findByCreditLevelid(Integer creditLevelid);

    void updatepassword(RunfastShopper shopper);

    void updateAlias(RunfastShopper shopper);
    void  updateUserName(RunfastShopper shopper);
    List<RunfastShopper> findBuAgentId(@Param("agentId") Integer agentId, @Param("teamid") Integer teamid);

    List<RunfastShopper> findAgentidAndWordtypeAndWorkingAndName(@Param("agentid") Integer agentid, @Param("work_type") Integer work_type, @Param("working") Integer working, @Param("name") String name);

    List<RunfastShopper> findNameAndAgerenAndTime(@Param("agentid") Integer agentid, @Param("name")String name, @Param("createtime1") Date createtime1, @Param("createtime2")Date createtime2);

    void updatelatitude(RunfastShopper runfastShopper);

    List<RunfastShopper> findToday(@Param("id") Integer id, @Param("createtime1") Date createtime1, @Param("createtime2") Date createtime2);
}